home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / os2 / srefv12i.zip / unzipapi.doc < prev    next >
Text File  |  1996-12-17  |  8KB  |  189 lines

  1. 12/96.
  2.  
  3. This contains an error-ridden description of UNZIPAPI.DLL.
  4. I've found that in some places where a "stem" variable is
  5. claimed to be needed, you have to use a string instead.
  6. And unziptovar chokes when a file name contains a &.
  7.  
  8. But it's free, so we should be nice.
  9.  
  10. By the way, the sites for the INFO-Zip project (from
  11. whence this hailed) are:
  12.    http://quest.jpl.nasa.gov/Info-ZIP/ 
  13.    ftp://ftp.uu.net/pub/archiving/zip/ 
  14.  
  15.  
  16. -------------------------------------------------------
  17.  
  18. ZDropFuncs
  19.   Use this function to drop all the loaded UnZip functions.
  20.   Once this function is processed by a REXX program, the 
  21.   UnZip functions are not accessible in any OS/2 sessions.  
  22.   
  23. UZLOADFUNCS  
  24.    call UZLoadFuncs
  25.  
  26.                Use this function to make all of the UnZip functions
  27.                in this package available to all OS/2 sessions.
  28.           Example:    call RxFuncAdd 'UZLoadFuncs', 'UNZIPAPI', 'UZLoadFuncs' 
  29.   
  30. UZFILETREE   
  31.    rc = UZFileTree(zipfile, stem, [include], [exclude], [options])  
  32.  
  33.         zipfile    - Name of ZIP file to search 
  34.         stem    - Name of the stem variable for results 
  35.                   Note: stem.0 contains the number of files found.
  36.         include - Optional stem variable specifying a list of files (including 
  37.                   wildcards) to include.  stem.0 must indicate number of items. 
  38.                   exclude - Optional stem variable specifying a list of files 
  39.                   (including  wildcards) to exclude.  
  40.                   stem.0 must indicate number of items.
  41.                NOTE: If lists are not needed, filespec strings may be passed.
  42.         options - One of the following:
  43.                    'O' - Give file names only.  This is the default. 
  44.                    'F' - Give file statistics in the form: 
  45.                               "Length Date Time Name 
  46.                    'Z' - Also give ZIP statistics in the form: 
  47.                             "Length Method Size Ratio Date Time CRC-32 Name
  48.  
  49.      Finds all files in the specified ZIP with the specified
  50.         filespec and places their descriptions in a stem variable.  
  51.         rc:    Return codes 
  52.                 0    Successful 
  53.                 2    Error.  Not enough memory.  
  54.         Examples: 
  55.                 /*Return a list of all .NDX files in pcboard.qwk*/
  56.                  rc = UZFileTree('pcboard.qwk', 'stem.', '*.ndx')
  57.                 /* Return a list of all files except *.NDX and *.DAT */
  58.                 exc.0 = 2; exc.1 = '*.ndx'; exc.2 = '*.dat' 
  59.                 rc = UZFileTree('pcboard.qwk', 'stem.',,'exc.')  
  60.   
  61. UZUNZIP
  62.        rc = UZUnZip('parameters', [stem])  
  63.  
  64.                 parameters    - The entire list of parameters you would use from 
  65.                                   the command-line 
  66.                 stem        - The name of an optional stem variable where any 
  67.                                   output should be redirected. 
  68.                           NOTE: If a stem is not specified, all output will 
  69.                                 go to the console.
  70.  Provide a direct entry point to the command line interface.  
  71.     rc:    UnZip return code  
  72.     Examples:    /* Test the archive 'unzip51s.zip' and return output in stem.*/
  73.                 rc = UZUnZip('-t unzip51s.zip','stem.')
  74.                /* Extract the archive, display output on screen */
  75.                call UZUnZip 'doom.zip' 
  76.                         /* Extract all .NDX files from the archive  */
  77.                         call UZUnZip 'pcboard.qwk *.ndx','stem.'  
  78.   
  79. UZUNZIPTOVAR 
  80.  
  81.      rc = UZUnZipToVar('zipfile', 'filename', [stem])  
  82.                 zipfile     - Name of ZIP file to search 
  83.                 filename - Name of file to extract from zipfile 
  84.                 stem     - Optional stem variable to extract the file to. 
  85.                            If you specify a stem variable, the file will be 
  86.                            extracted to the variable, one line per index, 
  87.                            stem.0 containing a line count.  
  88.                            In this case, 0 will be returned in rc.
  89.                            If NO stem variable is specified, the entire file   
  90.                            will be extracted to rc.
  91.            Unzip one file to a variable.  
  92.     rc:    If no stem variable is specified, rc contains the contents of 
  93.         the extracted file if successful or an error-code if not. 
  94.         If a stem variable IS specified, rc contains 0 if successful. 
  95.   
  96. UZUNZIPTOSTEM
  97.  
  98.   rc = UZUnZipToStem(zipfile, stem, [include], [exclude], [mode]) 
  99.  
  100.     zipfile  - Name of ZIP file to search
  101.     stem    - Stem variable used to store the extracted files 
  102.     include - Optional stem variable specifying a list of files (including 
  103.           wildcards) to include.  stem.0 must indicate number of items. 
  104.     exclude - Optional stem variable specifying a list of files (including 
  105.           wildcards) to exclude.  stem.0 must indicate number of items. 
  106.         NOTE: If lists are not needed, filespec strings may be passed. 
  107.     mode    - Optional mode parameter specifies either 'F'lat (the default) 
  108.           or 'T'ree mode. 
  109.         -- In flat mode, each file is stored in stem.fullname i.e. 
  110.            stem.os2/dll/unzipapi.c.  A list of files is created in 
  111.            stem.<index> 
  112.         -- In tree mode, slashes are converted to periods in the 
  113.            pathname thus the above file would have been stored in 
  114.            stem.OS2.DLL.unzipapi.c and an index stored for each 
  115.            directory, i.e. stem.OS2.DLL.<index> = \"unzipapi.c\", 
  116.            stem.OS2.<index> = \"DLL/\", stem.<index> = \"OS2/\"",
  117.            "Unzip files to a stem variable.  
  118.     Example:    Assuming a file unzip.zip containing: 
  119.               unzip.c, unshrink.c, extract.c, 
  120.               os2/makefile.os2, os2/os2.c 
  121.               os2/dll/dll.def, os2/dll/unzipapi.c  
  122.         rc = UZUnZipToStem('unzip.zip', 'stem.') 
  123.         Returns:    stem.0 = 7 
  124.                 stem.1 = unzip.c 
  125.                 stem.2 = unshrink.c 
  126.                 stem.3 = extract.c 
  127.                 stem.4 = os2/makefile.os2 
  128.                 stem.5 = os2/os2.c 
  129.                 stem.6 = os2/dll/dll.def 
  130.                 stem.7 = os2/dll/unzipapi.c 
  131.             And the following contain the contents of the 
  132.             various files: 
  133.                 stem.unzip.c 
  134.                 stem.unshrink.c 
  135.                 stem.extract.c 
  136.                 stem.os2/makefile.os2 
  137.                 stem.os2/os2.c 
  138.                 stem.os2/dll/dll.def 
  139.                 stem.os2/dll/unzipapi.c  
  140.         rc = UZUnZipToStem('unzip.zip', 'stem.',,,'TREE') 
  141.         Returns:    stem.0 = 4 
  142.             stem.1 = unzip.c 
  143.             stem.2 = unshrink.c 
  144.             stem.3 = extract.c 
  145.             stem.4 = OS2/ 
  146.             stem.OS2.0 = 3 
  147.             stem.OS2.1 = makefile.os2 
  148.             stem.OS2.2 = os2.c 
  149.             stem.OS2.3 = DLL/ 
  150.             stem.OS2.DLL.0 = 2 
  151.             stem.OS2.DLL.1 = def 
  152.             stem.OS2.DLL.2 = unzipapi.c 
  153.  
  154.         And the following contain the contents of the 
  155.         various programs: 
  156.             stem.unzip.c 
  157.             stem.unshrink.c 
  158.             stem.extract.c 
  159.             stem.OS2.makefile.os2 
  160.             stem.OS2.os2.c 
  161.             stem.OS2.DLL.dll.def 
  162.             stem.OS2.DLL.unzipapi.c  },
  163.  
  164. UZVer  
  165.     rc = UZVer([option])  
  166.         rc    String containing UnZip version info in the form 'x.xx'
  167.             If option is 'L' then info is in the form 'x.xx of <date>
  168.     Returns the version number of UnZip  
  169.  
  170. UZAPIVER  
  171.       rc = UZAPIVer([option])  
  172.         rcString containing API version info in the form 'x.xx' 
  173.                 If option is 'L' then info is in the form 'x.xx of <date>
  174.         Returns the version number of the API  
  175.  
  176.  
  177. REXX functions:
  178.   UZDropFuncs     -- Makes all functions in this package unknown to REXX 
  179.   UZLoadFuncs     -- Makes all functions in this package known to REXX 
  180.   UZFileTree      -- Searches for files matching a given filespec 
  181.   UZUnZip      -- UnZip command-line entry point 
  182.   UZUnZipToVar    -- Unzip one file to a variable 
  183.   UZUnZipToStem   -- Unzip files to a variable array 
  184.   UZVer           -- Returns the UnZip version number 
  185.   UZAPIVer        -- Returns the API version number 
  186.  
  187.  
  188. #endif
  189.